<!-- <!DOCTYPE HTML>
<html lang="en-US">
<head>
  <meta charset="UTF-8">
  <title></title>
</head>
<body> -->
  <?php
    if(isset($table) && $table == 'stock_in')
  {
  ?>
  <h5 class="title">Stock In</h5>
    <table id="stockin">
      <tr>
        <th>No</th>
        <th>Tanggal</th>
        <th>Partner ID</th>
        <th>Nama Partner</th>
        <th>Nama Item</th>
        <th>Jumlah Item</th>
        <th>Action</th>

      </tr>
      <?php
        $i= 1;
        foreach ($stock as $row) {
          echo '<tr>
                  <td>'.$i.'</td>
                  <td>'.$row->tanggal.'</td>
                  <td>'.$row->id_partner.'</td>
                  <td>'.$row->nama_partner.'</td>
                  <td>'.$row->item_name.'</td>
                  <td>'.$row->jumlah_item.'</td>
                  <td><a href="stockin/get_stock_detail/'.$row->id_partner.'/'.$row->stock_scan_id.'">View Detail</a></td>
                </tr>';
          $i++;
        }
      ?>
    </table>
  <?php
  } 
  else
  {
    ?>
  <h5 class="title">Stock In Detail</h5>
  
  <table id="stockin">
      <tr>
        <th>No</th>
        <th>Stock Scan ID</th>
        <th>Nama Partner</th>
        <th>Dibuat oleh</th>
        <th>tanggal</th>
        <th>iccid</th>
      </tr>
      <?php
        $i= 1;
        foreach ($stock_detail as $row) {
          echo '<tr>
                  <td>'.$i.'</td>
                  <td>'.$row->stock_scan_id.'</td>
                  <td>'.$row->partner_name.'</td>
                  <td>'.$row->created_by.'</td>
                  <td>'.$row->created_on.'</td>
                  <td>'.$row->iccid.'</td>
                </tr>';
          $i++;
        }
      ?>
    </table>
  <?php
  }
  ?>
<!-- </body>
</html> -->